Download MuleSoft Certified Developer - Level 2 (Mule 4).MCD-Level-2.VCEplus.2024-04-29.40q.vcex

Vendor: Mulesoft
Exam Code: MCD-Level-2
Exam Name: MuleSoft Certified Developer - Level 2 (Mule 4)
Date: Apr 29, 2024
File Size: 2 MB

How to open VCEX files?

Files with VCEX extension can be opened by ProfExam Simulator.

Demo Questions

Question 1
Refer to the exhibit.
 
What action must be performed to log all the errors raised by the VM Connector?
  1. Add <AsyncLOgger name='orgroute.extensions vm' level=ERROR'I> inside the Logger tag
  2. Add <AsyncLOgger name='orgroute.extensions vm' level=ERROR'/> inside the Appenders tag
  3. Configure <Logger level-'ERROR'/> inside the VM Connector configuration
  4. Nothing, as error-level events are automatically logged
Correct answer: B
Explanation:
To log all the errors raised by the VM Connector, the developer needs to add an async logger with the name 'org.mule.extension.vm' and the level 'ERROR' inside the appenders tag of the log4j2.xml file. This will enable logging all error-level events generated by the VM Connector to the console appender.Reference: https://docs.mulesoft.com/mule-runtime/4.3/logging-in-mule#configuring-custom-logging-settings
To log all the errors raised by the VM Connector, the developer needs to add an async logger with the name 'org.mule.extension.vm' and the level 'ERROR' inside the appenders tag of the log4j2.xml file. This will enable logging all error-level events generated by the VM Connector to the console appender.
Reference: https://docs.mulesoft.com/mule-runtime/4.3/logging-in-mule#configuring-custom-logging-settings
Question 2
A developer deploys an API to CloudHub and applies an OAuth policy on API Manager. During testing, the API response is slow, so the developer reconfigures the API so that the out-of-the-box HTTP Caching policy is applied first, and the OAuth API policy is applied second.
What will happen when an HTTP request is received?
  1. In case of a cache hit, both the OAuth and HTTP Caching policies are evaluated; then the cached response is returned to the caller
  2. In case of a cache it, only the HTTP Caching policy is evaluating; then the cached response is returned to the caller
  3. In case of a cache miss, only the HTTP Caching policy is evaluated; then the API retrieves the data from the API implementation, and the policy stores the data to be cached in Object Store
  4. In case of a cache miss, both the OAuth and HTTP Caching policies are evaluated; then the API retrieves the data from the API implementation, and the policy does not store the data in Object Store
Correct answer: B
Explanation:
When an HTTP request is received and the HTTP Caching policy is applied first, it checks if there is a cached response for that request in Object Store. If there is a cache hit, meaning that a valid cached response exists, then only the HTTP Caching policy is evaluated and the cached response is returned to the caller without invoking the OAuth policy or the API implementation. If there is a cache miss, meaning that no valid cached response exists, then both the HTTP Caching policy and the OAuth policy are evaluated before invoking the API implementation.Reference: https://docs.mulesoft.com/api-manager/2.x/http-caching-policy#policy-ordering
When an HTTP request is received and the HTTP Caching policy is applied first, it checks if there is a cached response for that request in Object Store. If there is a cache hit, meaning that a valid cached response exists, then only the HTTP Caching policy is evaluated and the cached response is returned to the caller without invoking the OAuth policy or the API implementation. If there is a cache miss, meaning that no valid cached response exists, then both the HTTP Caching policy and the OAuth policy are evaluated before invoking the API implementation.
Reference: https://docs.mulesoft.com/api-manager/2.x/http-caching-policy#policy-ordering
Question 3
A system API that communicates to an underlying MySQL database is deploying to CloudHub. The DevOps team requires a readiness endpoint to monitor all system APIs.
Which strategy should be used to implement this endpoint?
  1. Create a dedicated endpoint that responds with the API status and reachability of the underlying systems
  2. Create a dedicated endpoint that responds with the API status and health of the server
  3. Use an existing resource endpoint of the API
  4. Create a dedicated endpoint that responds with the API status only
Correct answer: A
Explanation:
To implement a readiness endpoint to monitor all system APIs, the developer should create a dedicated endpoint that responds with the API status and reachability of the underlying systems. This way, the DevOps team can check if the system API is ready to receive requests and if it can communicate with its backend systems without errors.Reference: https://docs.mulesoft.com/mule-runtime/4.3/deployment-strategies#readiness-probes
To implement a readiness endpoint to monitor all system APIs, the developer should create a dedicated endpoint that responds with the API status and reachability of the underlying systems. This way, the DevOps team can check if the system API is ready to receive requests and if it can communicate with its backend systems without errors.
Reference: https://docs.mulesoft.com/mule-runtime/4.3/deployment-strategies#readiness-probes
Question 4
A developer is working on a project that requires encrypting all data before sending it to a backend application. To accomplish this, the developer will use PGP encryption in the Mule 4 Cryptography module.
What is required to encrypt the data before sending it to the backend application?
  1. The application needs to configure HTTPS TLS context information to encrypt the data
  2. The application needs to both the private and public keys to encrypt the data
  3. The application needs the public key from the backend service to encrypt the data
  4. The application needs the private key from the backend service to encrypt the data
Correct answer: C
Explanation:
To encrypt the data before sending it to the backend application using PGP encryption, the application needs the public key from the backend service. PGP encryption uses a public-key cryptography system, which means that each party has a pair of keys: a public key and a private key. The public key is used to encrypt data, and the private key is used to decrypt data. Therefore, to encrypt data for a specific recipient (the backend service), the application needs to use the recipient's public key. The recipient can then use its own private key to decrypt the data.Reference: https://docs.mulesoft.com/mule-runtime/4.3/cryptography-pgp
To encrypt the data before sending it to the backend application using PGP encryption, the application needs the public key from the backend service. PGP encryption uses a public-key cryptography system, which means that each party has a pair of keys: a public key and a private key. The public key is used to encrypt data, and the private key is used to decrypt data. Therefore, to encrypt data for a specific recipient (the backend service), the application needs to use the recipient's public key. The recipient can then use its own private key to decrypt the data.
Reference: https://docs.mulesoft.com/mule-runtime/4.3/cryptography-pgp
Question 5
A heathcare customer wants to use hospital system data, which includes code that was developed using legacy tools and methods. The customer has created reusable Java libraries in order to read the data from the system.
What is the most effective way to develop an API retrieve the data from the hospital system?
  1. Refer to JAR files in the code
  2. Include the libraries writes deploying the code into the runtime
  3. Create the Java code in your project and invoice the data from the code
  4. Install libraries in a local repository and refer to it in the pm.xml file
Correct answer: D
Explanation:
To develop an API that retrieves data from a hospital system using reusable Java libraries, the developer should install libraries in a local repository and refer to it in the pom.xml file. This way, the developer can use Maven to manage dependencies and invoke Java code from Mule applications using Java Module operations.Reference: https://docs.mulesoft.com/mule-runtime/4.3/java-module-reference#add-the-java-module-to-your-project https://docs.mulesoft.com/mule-runtime/4.3/java-module-reference#invoke-java-code
To develop an API that retrieves data from a hospital system using reusable Java libraries, the developer should install libraries in a local repository and refer to it in the pom.xml file. This way, the developer can use Maven to manage dependencies and invoke Java code from Mule applications using Java Module operations.
Reference: https://docs.mulesoft.com/mule-runtime/4.3/java-module-reference#add-the-java-module-to-your-project https://docs.mulesoft.com/mule-runtime/4.3/java-module-reference#invoke-java-code
Question 6
An order processing system is composed of multiple Mule application responsible for warehouse, sales and shipping. Each application communication using Anypoint MQ. Each message must be correlated against the original order ID for observability and tracing.
How should a developer propagate the order ID as the correlation ID across each message?
  1. Use the underlying HTTP request of Anypoint MQ to set the 'X-CORRELATION_ID' header to the order ID
  2. Set a custom Anypoint MQ user property to propagate the order ID and set the correlation ID in the receiving applications.
  3. Use the default correlation ID, Anypoint MQ will sutomatically propagate it.
  4. Wrap all Anypoint MQ Publish operations within a With CorrelationID scope from the Tracing module, setting the correlation ID to the order ID
Correct answer: D
Explanation:
To propagate the order ID as the correlation ID across each message using Anypoint MQ, the developer should wrap all Anypoint MQ Publish operations within a With CorrelationID scope from the Tracing module, setting the correlation ID to the order ID. The With CorrelationID scope allows setting a custom correlation ID for any event that occurs within it. The Tracing module also enables distributed tracing across different Mule applications and services using Anypoint Monitoring.Reference: https://docs.mulesoft.com/tracing-module/1.0/tracing-module-reference#with-correlation-id-scope https://docs.mulesoft.com/tracing-module/1.0/tracing-module-concepts
To propagate the order ID as the correlation ID across each message using Anypoint MQ, the developer should wrap all Anypoint MQ Publish operations within a With CorrelationID scope from the Tracing module, setting the correlation ID to the order ID. The With CorrelationID scope allows setting a custom correlation ID for any event that occurs within it. The Tracing module also enables distributed tracing across different Mule applications and services using Anypoint Monitoring.
Reference: https://docs.mulesoft.com/tracing-module/1.0/tracing-module-reference#with-correlation-id-scope https://docs.mulesoft.com/tracing-module/1.0/tracing-module-concepts
Question 7
The Center for Enablement team published a common application as a reusable module to the central Nexus repository.
How can the common application be included in all API implementations?
  1. Download the common application from Naxus and copy it to the src/main/resources folder in the API
  2. Copy the common application's source XML file and out it in a new flow file in the src/main/mule folder
  3. Add a Maven dependency in the PCM file with multiple-plugin as <classifier>
  4. Add a Maven dependency in the POM file with jar as <classifier>
Correct answer: D
Explanation:
To include a common application as a reusable module in all API implementations, the developer should add a Maven dependency in the POM file with jar as <classifier>. This way, the developer can reuse Mule code from another application by packaging it as a JAR file and adding it as a dependency in the POM file of the API implementation. The classifier element specifies that it is a JAR file.Reference: https://docs.mulesoft.com/mule-runtime/4.3/mmp-concept#add-a-maven-dependency-to-the-pom-file
To include a common application as a reusable module in all API implementations, the developer should add a Maven dependency in the POM file with jar as <classifier>. This way, the developer can reuse Mule code from another application by packaging it as a JAR file and adding it as a dependency in the POM file of the API implementation. The classifier element specifies that it is a JAR file.
Reference: https://docs.mulesoft.com/mule-runtime/4.3/mmp-concept#add-a-maven-dependency-to-the-pom-file
Question 8
Refer to the exhibit.
 
The flow name is ''implementation'' with code for the MUnit test case.
When the MUnit test case is executed, what is the expected result?
  1. The test case fails with an assertion error
  2. The test throws an error and does not start
  3. The test case fails with an unexpected error type
  4. The test case passes
Correct answer: A
Explanation:
Based on the code snippet and MUnit test case below, when the MUnit test case is executed, the expected result is that the test case fails with an assertion error. This is because the assert-equals processor compares two values for equality, and fails if they are not equal. In this case, the expected value is 'Hello World', but the actual value returned by the implementation flow is 'Hello Mule'. Therefore, the assertion fails and an error is thrown.Reference: https://docs.mulesoft.com/munit/2.3/assert-equals-processor
Based on the code snippet and MUnit test case below, when the MUnit test case is executed, the expected result is that the test case fails with an assertion error. This is because the assert-equals processor compares two values for equality, and fails if they are not equal. In this case, the expected value is 'Hello World', but the actual value returned by the implementation flow is 'Hello Mule'. Therefore, the assertion fails and an error is thrown.
Reference: https://docs.mulesoft.com/munit/2.3/assert-equals-processor
Question 9
Which pattern can a web API use to notify its client of state changes as soon as they occur?
  1. HTTP Webhock
  2. Shared database trigger
  3. Schedule Event Publisher
  4. ETL data load
Correct answer: A
Explanation:
A web API can use HTTP Webhook to notify its client of state changes as soon as they occur. A webhook is an HTTP callback that allows an API to send real-time notifications to another system or application when an event happens. The client registers a URL with the API where it wants to receive notifications, and then the API sends an HTTP request to that URL with information about the event.Reference: https://docs.mulesoft.com/connectors/webhook/webhook-connector
A web API can use HTTP Webhook to notify its client of state changes as soon as they occur. A webhook is an HTTP callback that allows an API to send real-time notifications to another system or application when an event happens. The client registers a URL with the API where it wants to receive notifications, and then the API sends an HTTP request to that URL with information about the event.
Reference: https://docs.mulesoft.com/connectors/webhook/webhook-connector
Question 10
The HTTP Request operation raises an HTTP CONNECTIVITY error.
Which HTTP status code and body are returned to the web client?
  1. HTTP Status Code:200. Body 'Error in processing your request
  2. HTTP Status Code:500. Body 'The HTTP CONNECTIVITY Error description
  3. HTTP Status Code:500. Body 'Error in processing your request
  4. HTTP Status Code:500. Body 'Error in processing your request
Correct answer: C
Explanation:
When the HTTP Request operation raises an HTTP CONNECTIVITY error, it triggers an on-error-continue handler that sets a payload with 'Error in processing your request'. Since no status code is explicitly set in this handler, it defaults to 500 (INTERNAL SERVER ERROR). Therefore, the web client receives an HTTP response with status code 500 and body 'Error in processing your request'.Reference: https://docs.mulesoft.com/mule-runtime/4.3/error-handling#on-error-continue
When the HTTP Request operation raises an HTTP CONNECTIVITY error, it triggers an on-error-continue handler that sets a payload with 'Error in processing your request'. Since no status code is explicitly set in this handler, it defaults to 500 (INTERNAL SERVER ERROR). Therefore, the web client receives an HTTP response with status code 500 and body 'Error in processing your request'.
Reference: https://docs.mulesoft.com/mule-runtime/4.3/error-handling#on-error-continue
HOW TO OPEN VCE FILES

Use VCE Exam Simulator to open VCE files
Avanaset

HOW TO OPEN VCEX AND EXAM FILES

Use ProfExam Simulator to open VCEX and EXAM files
ProfExam Screen

ProfExam
ProfExam at a 20% markdown

You have the opportunity to purchase ProfExam at a 20% reduced price

Get Now!